package io.qar.coupons.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.qar.commons.tools.utils.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import io.qar.commons.mybatis.dto.CreateAndUpdatedDTO;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
* 优惠券表
*
* @author yyyyjinying 1020066395@qq.com
* @since 3.0 2024-06-11
*/
@Data
@ApiModel(value = "优惠券表")
public class CouponsDTO extends CreateAndUpdatedDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "优惠券ID")
    private Long couponId;
    @ApiModelProperty(value = "用户ID")
    private Long userId;
    @ApiModelProperty(value = "餐厅ID")
    private Long restaurantId;
    @ApiModelProperty(value = "优惠券代码")
    private String code;
    @ApiModelProperty(value = "折扣额度")
    private BigDecimal discount;
    @ApiModelProperty(value = "有效期开始时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date validFrom;
    @ApiModelProperty(value = "有效期结束时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date validUntil;
    @ApiModelProperty(value = "使用次数限制")
    private Integer usageLimit;
    @ApiModelProperty(value = "使用状态")
    private Object usedStatus;

}